<template>
  <img v-if="isString" :src="url" alt="image" style="width: 100%; height: auto" />
  <component v-else :is="url" v-bind="$attrs" style="width: 100%" />
</template>

<script>
export default {
  name: 'marker-info-window',
  props: {
    url: { type: [String, Function], default: undefined },
  },
  computed: {
    isString() {
      return typeof this.url === 'string';
    },
  },
};
</script>

<style scoped></style>
